
import numpy as np
import cv2 as cv

# 创建64*64照片
img = np.zeros((64,64,3),np.uint8)
cv.line(img, (0,0), (63,63), (255,0,0), 1)
cv.imshow('1_origin_img',img)
# cv.waitKey(0)

# 缩放图片x2
new_img = cv.resize(img, None, fx=2, fy=2, interpolation=cv.INTER_LINEAR)
cv.imshow('2_scale_img',new_img)
cv.waitKey(0)

cv.destroyAllWindows()